package com.itfenghuang.day03.controller;

import com.itfenghuang.bean.Student;
import com.itfenghuang.day03.service.StudentService;
import com.itfenghuang.day03.service.imp.StudentServiceImp;
import org.junit.Test;

import java.util.List;

/**
 * 表示层测试方法
 */
public class StudentController {
    private StudentService service=new StudentServiceImp();
    @Test
    public void selectAllStus(){
        List<Student> students = service.selectAllStus();
        System.out.println(students);
    }
//    @Test
//    public void addStu(){
//        int i = service.addStu(new Student(21,"字符",15,"女",2000,4);
//        System.out.println("受影响的行数"+i);
//    }
    @Test
    public void selectStusByCondition(){
        Student stu = new Student();
        stu.setSname("无情");
//        stu.setSsex("女");
//        stu.setSage(80);
        List<Student> list = service.selectStusByCondition(stu);
        System.out.println(list);
    }
}
